// postcss.config.js
// 用 vite 创建项目，配置 postcss 需要使用 post.config.js，之前使用的 .postcssrc.js 已经被抛弃
// 具体配置可以去 postcss-pxtorem 仓库看看文档
module.exports = {
    plugins: {
        autoprefixer: {},
        tailwindcss: {},
        'postcss-nested': {},
        'postcss-simple-vars': {},
        'postcss-import': {},
        'postcss-pxtorem': {
            rootValue: 20,
            viewportWidth: 1920, // (Number) The width of the viewport.
            viewportHeight: 1080, // (Number) The height of the viewport.
            // unitPrecision: 3, // (Number) The decimal numbers to allow the REM units to grow to.
            viewportUnit: 'rem', // (String) Expected units.
            selectorBlackList: ['.norem'], // (Array) The selectors to ignore and leave as px.
            minPixelValue: 1, // (Number) Set the minimum pixel value to replace.
            mediaQuery: false, // (Boolean) Allow px to be converted in media queries.
            propList: ['*']
        }
    }
};
